package com.macro.mall.portal.util;

import com.macro.mall.ums.enums.UserGenderEnum;

/**
 * 微信性别工具类
 *
 * @author xuyanjun
 * @date 2019-07-11
 */
public class GenderUtils {

    /**
     * 微信性别转用户性别
     *
     * @param wxGender 微信性别
     * @return 用户性别
     */
    public static UserGenderEnum wxGenderToUserGender(String wxGender) {
        UserGenderEnum userGender = UserGenderEnum.UNKNOW;
        switch (wxGender) {
            case "1":
                userGender = UserGenderEnum.MAN;
                break;
            case "2":
                userGender = UserGenderEnum.WOMAN;
                break;
            default:
                break;
        }
        return userGender;
    }

}
